package com.amazon.operations;

import java.util.ArrayList;

/**
 *
 * @author Salman Noor, Shcool of Electrical and Information Engineering
 * @Copyright: Wits University 2013 - All Rights Reserved @email
 * salmannoor74415@gmail.com @License BSD License
 * (http://www.linfo.org/bsdlicense.html)
 */
public class sum extends Operation {

    @Override
    public void setParameters(ArrayList<Integer> parameters) {
        super.parameters = parameters;
    }

    @Override
    public int findResult() {
        Integer sum = 0;
        for (Integer i : super.parameters) {
            sum = sum + i;
        }
        return sum;
    }
}
